package com.shirley.pers.zhufengfmvi.tasks;

import android.os.AsyncTask;

import com.shirley.pers.zhufengfmvi.client.ClientAPI;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Description:获取发现模块 推荐栏目的数据
 * 对应接口；11<br/>
 * <p/>
 * Copyright (c) , 2016, Shirley Xian <br/>
 * This program is protected by copyright laws. <br/>
 * ClassName: DiscoveryRecommendTask<br/>
 * Date: 2016/4/6 11:51
 *
 * @author Shirley Xian
 * @version 1.0
 */
public class DiscoveryRecommendTask extends BaseTask {

    public DiscoveryRecommendTask(TaskCallback taskCallback) {
        super(taskCallback);
    }

    /**
     * Override this method to perform a computation on a background thread. The
     * specified parameters are the parameters passed to {@link #execute}
     * by the caller of this task.
     * <p/>
     * This method can call {@link #publishProgress} to publish updates
     * on the UI thread.
     *
     * @param params The parameters of the task.
     * @return A result, defined by the subclass of this task.
     * @see #onPreExecute()
     * @see #onPostExecute
     * @see #publishProgress
     */
    @Override
    protected TaskResult doInBackground(String... params) {
        String str = ClientAPI.getDiscoveryRecommends(true, true);
        return getTaskResult(str, new TaskResult());
    }
}
